Add metadata and capture roll/frame to export filename templates, with safe frame padding and pre-export settings flush - #721
Merged
marcinz606 merged 5 commits intoAug 1, 2026
Conversation
…h safe frame padding and pre-export settings flush
…_template_variables
jboneng
marked this pull request as draft
August 1, 2026 14:40
…ort if set, if not set, these fields is omitted
…_template_variables
jboneng
marked this pull request as ready for review
August 1, 2026 15:06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Export filename templates can now include analog metadata and Scanlight capture identity (roll, frame, camera, film, etc.). Capture roll/frame are stamped automatically on import and editable in the Metadata panel. A pre-export flush ensures the export always uses the latest sidebar settings, even when the user clicks Export before the 500ms debounce has fired.
New filename template variables
All metadata variables are read from the file’s
MetadataConfigat export time (the Metadata panel for the current frame, or each file’s saved config in a batch). Path-unsafe characters are stripped; empty fields render as empty strings.{{ roll }}MetadataConfig.capture_roll{roll}_Frame{NNN}source filename stem. Not the Roll Analysis normalization name (process.roll_name).{{ frame }}MetadataConfig.capture_frame{roll}_Frame{NNN}stem. Unset (none) if unknown.{{ frame_padded }}frame012). Empty when frame is unset. Same as{{ frame|pad(3) }}.{{ frame|pad(N) }}framepadfilter — zero-pads to N digits; empty when frame is unset (avoids"%03d" % framecrashing the whole template).{{ camera }}camera_make+camera_model"Make Model", trimmed.{{ camera_make }}MetadataConfig.camera_make{{ camera_model }}MetadataConfig.camera_model{{ lens }}lens_modelorlens_make{{ lens_make }}MetadataConfig.lens_make{{ lens_model }}MetadataConfig.lens_model{{ focal_length }}MetadataConfig.focal_length_mm{{ film }}MetadataConfig.film{{ film_iso }}MetadataConfig.film_iso{{ film_manufacturer }}MetadataConfig.film_manufacturer{{ film_color_type }}MetadataConfig.film_color_type{{ film_format }}MetadataConfig.format/format_otherformat_otherwhen format is"Other". Distinct from export{{ format }}(JPEG/TIFF).{{ developer }}MetadataConfig.developer{{ push_pull }}MetadataConfig.push_pull{{ scanning }}MetadataConfig.scanning{{ exposure }}MetadataConfig.exposure_overrideExisting export variables (
original_name,colorspace,format,paper_ratio,size,dpi,target_px,border,date) are unchanged.Example
{% if roll %}{{ roll }}{% endif %}{% if frame %}Frame{{ frame|pad(3) }}{% endif %}{{ film }}{{ film_iso }}{{ camera }}_{{ original_name }}
Use
{% if %}blocks when a variable may be empty — otherwise literal labels likeFramecan remain in the filename even when roll/frame are unset.Pre-export settings flush
The Export sidebar debounces changes to Format / Size / Colour / Destination for 500ms before writing them into
WorkspaceConfig. Without a flush, clicking Export (or Export Presets) immediately after editing the filename pattern or destination could run against stale config.This PR adds
_flush_export_settings()on the export sidebar, registered on the controller asflush_export_settings. Before any export path runs, the controller calls_flush_export_ui(), which stops the debounce timer and persists the form immediately. Covered entry points:Other changes
capture_roll/capture_frame).roll_nameandframe_numberare stamped into metadata when a captured file is opened.original_name.docs/TEMPLATING.mdanddocs/USER_GUIDE.mdupdated.Test plan
{{ frame|pad(3) }}in the pattern — template does not fall back tooriginal_name.Fixes expand export filename templates with metadata variables #704